﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace T.FAS.Runtime.Action.SPI
{
    public class SGRetListData<T>
    {
        public int state { get; set; }

        public string errmsg { get; set; }

        public int total { get; set; }

        public object rows { get; set; }

        public SGRetListData(string errmessage, bool userError = false)
        {
            if (!userError)
                state = 0;
            else
                state = 2;
            errmsg = errmessage;
        }
        public SGRetListData(int cnt, List<T> data)
        {
            state = 1;
            total = cnt;
            rows = data;
        }
    }
}
